#pragma once

#include <initguid.h>
#include <ObjBase.h>

// {BE7F95C9-E6B8-45b9-A2A8-F3530818D008}
DEFINE_GUID(CLSID_IExampleEvts, 0xbe7f95c9, 0xe6b8, 0x45b9, 0xa2, 0xa8, 0xf3, 0x53, 0x8, 0x18, 0xd0, 0x8);

// {D811CB72-CBA2-4ffa-AF26-E9D725ECA7AD}
DEFINE_GUID(IID_IExampleEvts, 0xd811cb72, 0xcba2, 0x4ffa, 0xaf, 0x26, 0xe9, 0xd7, 0x25, 0xec, 0xa7, 0xad);

// {FD8C14F7-5BC3-4ec2-994C-A114C2ADA4A7}
DEFINE_GUID(TLBID_IExampleEvts, 0xfd8c14f7, 0x5bc3, 0x4ec2, 0x99, 0x4c, 0xa1, 0x14, 0xc2, 0xad, 0xa4, 0xa7);

#undef INTERFACE
#define INTERFACE IExampleEvts
DECLARE_INTERFACE_(INTERFACE, IDispatch)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID, void **) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT *) PURE;
    STDMETHOD(GetTypeInfo)(THIS_ UINT, LCID, ITypeInfo **) PURE;
    STDMETHOD(GetIDsOfNames)(THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *) PURE;
    STDMETHOD(Invoke)(THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) PURE;
    STDMETHOD(DoSomething)(THIS) PURE;
    STDMETHOD(Sort)(THIS_ LPVOID, DWORD, DWORD) PURE;
};

// {2537C4D4-90B1-4863-AF7A-F0CA5F64D4F3}
DEFINE_GUID(DIID_IFeedback, 0x2537c4d4, 0x90b1, 0x4863, 0xaf, 0x7a, 0xf0, 0xca, 0x5f, 0x64, 0xd4, 0xf3);

#undef INTERFACE
#define INTERFACE IFeedback
DECLARE_INTERFACE_(INTERFACE, IDispatch)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID, void **) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT *) PURE;
    STDMETHOD(GetTypeInfo)(THIS_ UINT, LCID, ITypeInfo **) PURE;
    STDMETHOD(GetIDsOfNames)(THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *) PURE;
    STDMETHOD(Invoke)(THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) PURE;
    STDMETHOD(Callback1)(THIS) PURE;
    STDMETHOD(Callback2)(THIS) PURE;
    STDMETHOD(Callback3)(THIS) PURE;
};

// {4DEA7FB0-9117-439f-9C22-41C47E110354}
DEFINE_GUID(DIID_ICompare, 0x4dea7fb0, 0x9117, 0x439f, 0x9c, 0x22, 0x41, 0xc4, 0x7e, 0x11, 0x3, 0x54);

#undef INTERFACE
#define INTERFACE ICompare
DECLARE_INTERFACE_(INTERFACE, IDispatch)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID, void **) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(GetTypeInfoCount)(THIS_ UINT *) PURE;
    STDMETHOD(GetTypeInfo)(THIS_ UINT, LCID, ITypeInfo **) PURE;
    STDMETHOD(GetIDsOfNames)(THIS_ REFIID, LPOLESTR *, UINT, LCID, DISPID *) PURE;
    STDMETHOD(Invoke)(THIS_ DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, UINT *) PURE;
    STDMETHOD_(LONG, Compare)(THIS_ const LPVOID, const LPVOID) PURE;
};
